﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RecruitStudents.Utility;
using RecruitStudents.Utility.Json;

namespace RecruitStudents.Client.BLL
{
    class ServiceSecretary
    {
        WS_Secretary.SecretaryService secretaryService = new WS_Secretary.SecretaryService();
        WS_Secretary.MySoapHeader objHeader = new WS_Secretary.MySoapHeader();
        internal ServiceSecretary()
        {
            objHeader.Username = "admin";
            objHeader.Password = "xy";
            secretaryService.MySoapHeaderValue = objHeader;
        }
        internal DataTable GetGroupList(string strExamPlaceID, string strSpecialityKindsNO, string strExamLevel)
        {
            return new ServiceComm().GetAppointmentGroupDataTable(strExamPlaceID, strSpecialityKindsNO, strExamLevel);
        }

        internal DataTable GetScoreQuery_Sec(string strGroupNo, string strExamRoomID)
        {
            return secretaryService.GetScoreQuery_Sec(strGroupNo, strExamRoomID).ToDataTable();
        }
        internal DataTable GetScoreQuery_Sec_KS(string strGroupNo, string strExamRoomID)
        {
            return secretaryService.GetScoreQuery_Sec_KS(strGroupNo, strExamRoomID).ToDataTable();
        }

        internal DataTable GetTeacherNoDF(string strGroupNo, string strExamRoomID)
        {
            return secretaryService.GetTeacherNoDF(strGroupNo, strExamRoomID).ToDataTable();
        }

        internal JsonMessage SaveSecExaming(string strNum, string strGroupNo, string strExamRoomID, string strExamRoomName)
        {
            JsonMessage message = secretaryService.SaveSecExaming(strNum, strGroupNo, strExamRoomID, strExamRoomName).ToList<JsonMessage>();
            return message;
        }

        internal JsonMessage SaveCalculationAvgPoints(string strGroupNo, string strExamRoomID)
        {
            JsonMessage message = secretaryService.SaveCalculationAvgPoints(strGroupNo, strExamRoomID).ToList<JsonMessage>();
            return message;
        }
    }
}
